updating oE float32_to_atom

float32_to_atom

include convert.e 
namespace convert 
public function float32_to_atom(sequence_4 ieee32) 

converts a sequence of 4 bytes in IEEE 32-bit format to an atom.

Parameters:
  1. ieee32 : the sequence to convert.
Returns:

An atom, the same value as the FPU would see by peeking ieee64 from RAM.

Comments:

Any 32-bit IEEE floating-point number can be converted to an atom.

Example 1:
f = repeat(0, 4) 
fn = open("numbers.dat", "rb") -- read binary 
f[1] = getc(fn) 
f[2] = getc(fn) 
f[3] = getc(fn) 
f[4] = getc(fn) 
a = float32_to_atom(f) 
See Also:

float64_to_atom, bytes_to_int, atom_to_float32

Not Categorized, Please Help

Search



Quick Links

User menu

Not signed in.

Misc Menu